package com.hivekion.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hivekion.common.entity.PagedResultVo;
import com.hivekion.common.entity.TreeNode;
import com.hivekion.system.domain.SysUser;
import com.hivekion.system.domain.vo.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

/**
 * 用户 业务层
 *
 * @author sutao
 */
public interface ISysUserService extends IService<SysUser> {

      PagedResultVo<SysUserViewVo> selectUserList(SysUserSearchPageInputVo user);

      /**
       * 校验用户名称是否唯一
       *
       * @param userName 用户名称
       * @return
       */
      Boolean checkUserNameUnique(String userName, String userId);

      /**
       * 校验email是否唯一
       *
       * @param email
       * @return
       */
      Boolean checkEmailUnique(String email, String userId);

      /**
       * 校验手机号码是否唯一
       *
       * @param phone
       * @return
       */
      Boolean checkPhoneUnique(String phone, String userId);

      boolean create(SysUserCreateInputVo user);

      boolean update(SysUserUpdateInputVo inputVo);

      boolean delete(String userId);

      boolean resetPwd(SysUserResetPwdVo pwdVo);

      boolean changeStatus(String userId, Integer status);

      SysUserModelVo getInfo(String userId);

      SysUser getUserByUserName(String userName);

      String getUserName(String userIds);

      List<String> getPermissions(String userId);

      List<SysUser> getAllUser();

      List<TreeNode> getUserTree();

      List<TreeNode> getStatisticianByArea(String areaCode);

      List<TreeNode> getUserArea();

      boolean clearUserTreeData();

      void delDuplicateUser();

      Set<String> importExcel(MultipartFile file);
}
